import http from "./http";

//生成订单
export const createApi = (obj) => {
  return http({
    url: "http://localhost:12345/api/order/create",
    method: "POST",
    data: obj,
  });
};

//获取订单详情
export const getOrderApi = (id) => {
  return http({
    url: "http://localhost:12345/api/order/getOrder/" + id,
    method: "GET",
    params: {},
  });
};

//获取订单列表
export const getOrderListApi = () => {
  return http({
    url: "http://localhost:12345/api/order/getOrderList/" + localStorage.getItem('username'),
    method: "GET",
    params: {},
  });
};